import Vue from 'vue'
import VueRouter from 'vue-router'
import HelloWorld from '@/views/HelloWorld.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'HelloWorld',
    component: HelloWorld,
    children: [
      {
        path: 'singleChild1*',
        name: 'singleChild1',
        meta: {
          keepAlive: true
        }
      },
      {
        path: 'singleChild2*',
        name: 'singleChild2',
        meta: {
          keepAlive: true
        }
      }
    ]
  }
]

export default new VueRouter({
  mode: 'history',
  routes
})
